
export default {
  OfficerUploadTransaction: {
    entity: { name: 'Transaction', prefix: `officer` },
    list: {
      export: {
        query: {
          '@display': `{
                    'from' : 'entity.getFrom().__toString()',
                    'to' : 'entity.getTo().__toString()',
                    'amount' : 'entity.getAmount()',
                    'comment' : 'entity.getComment()',
                    'status': 'entity.getStatus()',
                    'createdTime' : 'entity.getCreatedTime().format("Y-m-d H:i:s")'
                }`,
          'limit': 100000000
        },
        label: {
          'from': 'from',
          'to': 'to',
          'amount': '金额',
          'comment': '备注',
          'status': '状态',
          'createdTime': '创建时间'
        }
      },
      disabled_actions: ['edit', 'lines', 'delete', 'new'],
      actions: [
        {
          name: '导入',
          position: 'top',
          component:
            () => import('@/views/officer-upload-transaction/ele-matter-transaction-import')
        }
      ],
      query: {
        '@filter': 'entity.getType() == "upload"',
        '@order': 'entity.id|DESC'
      },
      list_filter: {
        beforeCreatedTime: {
          expression: 'entity.getCreatedTime() >= datetime.get(":value  00:00:00")',
          label: '开始时间',
          type: 'date'
        },
        afterCreatedTime: {
          expression: 'entity.getCreatedTime() < datetime.get(":value 23:59:59")',
          label: '结束时间',
          type: 'date'
        }
      },
      list_display: [
        'createdTime',
        'from',
        'to',
        'amount',
        'comment',
        'status'
      ]
    },
    form: {
      fields: [
      ]
    }
  }
}

